package javaDemo09.图形化awt;

import java.awt.*;

public class Card {

    public static void main(String[] args) {
        Frame frame = new Frame("这里测试对话框对象");

        Dialog d1 = new Dialog(frame, "模式对话框",true);

        d1.setBounds(20,30,300,500);
        d1.add(new TextField(25),BorderLayout.WEST);
        d1.add(new Button("登录"));



        Button b1 = new Button("打开模式对话框");


        b1.addActionListener(e -> d1.setVisible(true));


        frame.add(b1, BorderLayout.NORTH);


        frame.pack();
        frame.setVisible(true);






    }
}
